//银行信息显示
$(function(){
	var loginReturnBean;
	$.ajax({
		url : '/Lvscore_Advertiser_Maven/withdraw',
		data : loginReturnBean,
		type : 'post',
		dataType : 'json',
		success : function(data){
			$("#bankName").val(data.bankName);
			$("#openBank").val(data.openBank);
			$("#accountNumber").val(data.accountNumber);
		},
		error : function(){
			console.log("err");
		}
	});
	
//账户提现	
	var path=escape('selectedNav=0&navPos=1');
	$("#submitApply").click(function(){
		var money = $("#withDrawDeposit").val();
		var param = {money : money};
		$.ajax({
			url : '/Lvscore_Advertiser_Maven/drawCash',
			data : param,
			type : 'post',
			success : function(data){
				console.log(data);
				if(data.status == -1){
					$("#error_balance").html(data.error);
				}else{
					window.location.href = "/Lvscore_Advertiser_Maven/advertiserWeb/views/userCenter/accountBalance/saveSuccess.html?"+path;
				}
			},
			/*error : function(xhr){
				 console.log("readyState" + xhr.readyState + "status" + xhr.status);
			}*/
		});
	})
})


